package virtualstock.entity;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name = "stock", schema = "vstock")

@NamedQuery(name="Stock.GetAllStock", query = "SELECT a FROM Stock a")

public class Stock implements Serializable {
	@Id
	@Column(name="stockID", nullable=false)
	private Long stockID;

	@Column(name="stock_name")
	private String stockName;

	@Column(name="current_price")
	private BigDecimal currentPrice;

	private static final long serialVersionUID = 1L;

	public Stock() {
		super();
	}
	
	public Stock(String stockName, BigDecimal currentPrice) {
		this.stockName = stockName;
		this.currentPrice = currentPrice;
	}

	public Long getStockID() {
		return this.stockID;
	}

	public void setStockID(Long stockID) {
		this.stockID = stockID;
	}

	public String getStockName() {
		return this.stockName;
	}

	public void setStockName(String stockName) {
		this.stockName = stockName;
	}

	public BigDecimal getCurrentPrice() {
		return this.currentPrice;
	}

	public void setCurrentPrice(BigDecimal currentPrice) {
		this.currentPrice = currentPrice;
	}

}
